NAME = client
PORT ?= 2629
IP ?= 127.0.0.1
TIME ?= 30
PREFIX = `pwd`/../lib/
INCLUDE = `pwd`/../include/
CFLAGS += -I ${INCLUDE}
LDFLAGS += -L ${PREFIX}
LIBLAGS += -lclient -lsqlite3
CC = gcc

all: clean
	${CC} main.c -o ${NAME} ${CFLAGS} ${LDFLAGS} ${LIBLAGS}

clean:
	rm -f ${NAME}

distclean: clean
	rm -f *.log
	rm -f *.db

run:
	export PATH=$$PATH:`pwd`;export LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:${PREFIX};${NAME} -p ${PORT} -i ${IP} -b ${TIME}

